package project2011;

/**
 * Manages bankAccount details
 * @author Gilles Beauvoir
 */
public class bankAccount {
    /**
     * The constructor for bankAccount
     * @param accountNumber account
     * @param balance balance
     */
    public bankAccount(int accountNumber, double balance)
    {
        this.accountNumber = accountNumber;
        this.balance = balance;
    }
    /**
     * Accessor for account
     * @return account number
     */
    public int getAccount()
    {
        return accountNumber;
    }
    /**
     * Accessor for balance
     * @return balance
     */
    public double getBalance()
    {
        return balance;
    }
    /**
     * Changes the balance of the given account
     * @param x 
     */
    public void setBalance(double x){
        this.balance = balance+ x;
    }
    
    /**
     * returns the bankaccount info in a string
     */
     public String print()
    {
        String result =  accountNumber+ ",";
        result += balance + ",\n";
        
        return result;
    }
    
    private int accountNumber;
    private double balance;
}
